-- Version: 8.6 SP1 8.6.1.4

library ieee;
use ieee.std_logic_1164.all;
library fusion;
use fusion.all;

entity FLASHROM is

    port( HCLK     : in    std_logic;
          HRESETn  : in    std_logic;
          HADDR    : in    std_logic_vector(20 downto 0);
          HTRANS   : in    std_logic_vector(1 downto 0);
          HWRITE   : in    std_logic;
          HSIZE    : in    std_logic_vector(2 downto 0);
          HWDATA   : in    std_logic_vector(31 downto 0);
          HREADYIN : in    std_logic;
          HRDATA   : out   std_logic_vector(31 downto 0);
          HREADY   : out   std_logic;
          HRESP    : out   std_logic_vector(1 downto 0);
          HSEL     : in    std_logic
        );

end FLASHROM;

architecture DEF_ARCH of FLASHROM is 

  component VCC
    port( Y : out   std_logic
        );
  end component;

  component GND
    port( Y : out   std_logic
        );
  end component;

  component CoreAhbNvm
    generic (NVM_INSTANCES:integer := 0);

    port( HCLK     : in    std_logic := 'U';
          HRESETn  : in    std_logic := 'U';
          HSEL     : in    std_logic := 'U';
          HWRITE   : in    std_logic := 'U';
          HREADYIN : in    std_logic := 'U';
          HTRANS   : in    std_logic_vector(1 downto 0) := (others => 'U');
          HSIZE    : in    std_logic_vector(2 downto 0) := (others => 'U');
          HWDATA   : in    std_logic_vector(31 downto 0) := (others => 'U');
          HADDR    : in    std_logic_vector(20 downto 0) := (others => 'U');
          HREADY   : out   std_logic;
          HRESP    : out   std_logic_vector(1 downto 0);
          HRDATA   : out   std_logic_vector(31 downto 0)
        );
  end component;

    signal GND_net, VCC_net : std_logic;

begin 


    \VCC\ : VCC
      port map(Y => VCC_net);
    
    \GND\ : GND
      port map(Y => GND_net);
    
    FROM_0 : CoreAhbNvm
      generic map(NVM_INSTANCES => 4)

      port map(HCLK => HCLK, HRESETn => HRESETn, HSEL => HSEL, 
        HWRITE => HWRITE, HREADYIN => HREADYIN, HTRANS(1) => 
        HTRANS(1), HTRANS(0) => HTRANS(0), HSIZE(2) => HSIZE(2), 
        HSIZE(1) => HSIZE(1), HSIZE(0) => HSIZE(0), HWDATA(31)
         => HWDATA(31), HWDATA(30) => HWDATA(30), HWDATA(29) => 
        HWDATA(29), HWDATA(28) => HWDATA(28), HWDATA(27) => 
        HWDATA(27), HWDATA(26) => HWDATA(26), HWDATA(25) => 
        HWDATA(25), HWDATA(24) => HWDATA(24), HWDATA(23) => 
        HWDATA(23), HWDATA(22) => HWDATA(22), HWDATA(21) => 
        HWDATA(21), HWDATA(20) => HWDATA(20), HWDATA(19) => 
        HWDATA(19), HWDATA(18) => HWDATA(18), HWDATA(17) => 
        HWDATA(17), HWDATA(16) => HWDATA(16), HWDATA(15) => 
        HWDATA(15), HWDATA(14) => HWDATA(14), HWDATA(13) => 
        HWDATA(13), HWDATA(12) => HWDATA(12), HWDATA(11) => 
        HWDATA(11), HWDATA(10) => HWDATA(10), HWDATA(9) => 
        HWDATA(9), HWDATA(8) => HWDATA(8), HWDATA(7) => HWDATA(7), 
        HWDATA(6) => HWDATA(6), HWDATA(5) => HWDATA(5), HWDATA(4)
         => HWDATA(4), HWDATA(3) => HWDATA(3), HWDATA(2) => 
        HWDATA(2), HWDATA(1) => HWDATA(1), HWDATA(0) => HWDATA(0), 
        HADDR(20) => HADDR(20), HADDR(19) => HADDR(19), HADDR(18)
         => HADDR(18), HADDR(17) => HADDR(17), HADDR(16) => 
        HADDR(16), HADDR(15) => HADDR(15), HADDR(14) => HADDR(14), 
        HADDR(13) => HADDR(13), HADDR(12) => HADDR(12), HADDR(11)
         => HADDR(11), HADDR(10) => HADDR(10), HADDR(9) => 
        HADDR(9), HADDR(8) => HADDR(8), HADDR(7) => HADDR(7), 
        HADDR(6) => HADDR(6), HADDR(5) => HADDR(5), HADDR(4) => 
        HADDR(4), HADDR(3) => HADDR(3), HADDR(2) => HADDR(2), 
        HADDR(1) => HADDR(1), HADDR(0) => HADDR(0), HREADY => 
        HREADY, HRESP(1) => HRESP(1), HRESP(0) => HRESP(0), 
        HRDATA(31) => HRDATA(31), HRDATA(30) => HRDATA(30), 
        HRDATA(29) => HRDATA(29), HRDATA(28) => HRDATA(28), 
        HRDATA(27) => HRDATA(27), HRDATA(26) => HRDATA(26), 
        HRDATA(25) => HRDATA(25), HRDATA(24) => HRDATA(24), 
        HRDATA(23) => HRDATA(23), HRDATA(22) => HRDATA(22), 
        HRDATA(21) => HRDATA(21), HRDATA(20) => HRDATA(20), 
        HRDATA(19) => HRDATA(19), HRDATA(18) => HRDATA(18), 
        HRDATA(17) => HRDATA(17), HRDATA(16) => HRDATA(16), 
        HRDATA(15) => HRDATA(15), HRDATA(14) => HRDATA(14), 
        HRDATA(13) => HRDATA(13), HRDATA(12) => HRDATA(12), 
        HRDATA(11) => HRDATA(11), HRDATA(10) => HRDATA(10), 
        HRDATA(9) => HRDATA(9), HRDATA(8) => HRDATA(8), HRDATA(7)
         => HRDATA(7), HRDATA(6) => HRDATA(6), HRDATA(5) => 
        HRDATA(5), HRDATA(4) => HRDATA(4), HRDATA(3) => HRDATA(3), 
        HRDATA(2) => HRDATA(2), HRDATA(1) => HRDATA(1), HRDATA(0)
         => HRDATA(0));
    

end DEF_ARCH; 
